#include "gdt.hpp"

struct gdt_pointer{
    uint16 limit;
    uint32 base;
} __attribute__((packed));

struct gdt_entry{
    uint16 limit_low;
    uint16 base_low;
    uint8  base_middle;
    uint8  attributes;
    uint8  extension;
    uint8  base_high;
} __attribute__((packed));

gdt_entry gdt_table[] = {
    {0x0000,0x0000,0x00,0x00,0x00,0x00},
    {0xFFFF,0x0000,0x00,0x9A,0xCF,0x00},
    {0xFFFF,0x0000,0x00,0x92,0xCF,0x00}
};

gdt_pointer gdt_table_ptr = {sizeof(gdt_table)-1,(uint32)gdt_table};
